{{template "header_en"}}
		<title>Go 步行者 - Go 项目 API 文档</title>
	</head>

	<body id="body" style="padding-top: 60px; font-family: Microsoft Yahei; font-size: 13px;">
		{{template "navbar_zh" .}}
		<div class="container" style="width: 1000px;">
			<div id="main_content" class="row">
                <div style="margin-left: 20px;">
                    {{template "alert_zh" .}}
                    <div class="page-header">
                        <h2 style="margin-top: 0">
                            搜索 Go 项目. 
                            <small>开源，让世界更和谐.</small>
                        </h2>

                        <form action="/">
                            <div class="input-append">
                                <input autocomplete="off" class="span6" type="text" placeholder="输入导入路径来添加文档或使用关键字搜索" value="{{.Keyword}}" name="q" data-source="[{{str2html .DataSrc}}]" data-items="8" data-provide="typeahead"></input>
                                <button class="btn" type="submit"><i class="icon-search"></i> 手气不错</button>
                            </div>
                        </form>
                    </div>
                </div>

	    		<div id="homeleft" class="span6 homeleft">
					<div>
						<h4>什么是 Go 步行者？</h4>

						<p>
							Go 步行者是一个用于在线生成并浏览 <a target="_blank" href="http://docs.studygolang.com/">Go</a> 项目 API 文档及源码 的 Web 服务器，目前支持的平台包括 <b><a target="_blank" href="https://bitbucket.org/">Bitbucket</a></b>，<b><a target="_blank" href="https://github.com/">Github</a></b>，<b><a target="_blank" href="http://code.google.com/">Google Code</a></b>，<b><a target="_blank" href="https://launchpad.net/">Launchpad</a></b> 和 <b><a target="_blank" href="http://git.oschina.net/">Git @ OSC</a></b> 五大版本控制平台。
						</p>

						<p>
							性感的特性包括
							<button class="btn feature" title="" data-content="在相同页面快速查看高亮渲染后的函数或方法的代码，减少页面占用，可以同时做更多的工作。" data-placement="left" data-toggle="popover" data-original-title="查看代码">查看代码</button>

							<button class="btn feature" title="" data-content="快速跳转至函数、方法或类型所以在项目的文档页面，节省您的宝贵时间。" data-placement="top" data-toggle="popover" data-original-title="链接跳转">链接跳转</button>

							<button class="btn feature" title="" data-content="通过 Github Gist 来为您喜爱的文档添加示例，更好地展示给更多人。" data-placement="bottom" data-toggle="popover" data-original-title="增加示例">增加示例</button>

							<button class="btn feature" title="" data-content="不必再为使用旧版的库而烦恼，现在您可以查看任意 Tag 版本的项目文档喔！" data-placement="right" data-toggle="popover" data-original-title="文档标签">文档标签</button>

							以及 <a target="_blank" href="https://github.com/Unknwon/gowalker/blob/master/docs/Features_ZH.md">更多</a>.
						</p>
						
						<p class="text-success">
							如果您想了解如何向 Go 步行者添加开源项目或了解更多，请仔细阅读  <a href="/about">关于</a> 页面。
						</p>
					</div>

                    <div class="tab-content">
                        <div id="global_recent_view" class="tab-pane fade active in">
							<h4>
								看看其它人在关注什么.
								<a href="#user_recent_view" class="btn btn-inverse" data-toggle="tab">我的历史</a>
							</h4>

                            <table name="recent_table" class="table table-bordered table-hover">
								<thead>
									<tr>
										<th>项目路径（排名值）</th>
										<th>浏览时间（本地）</th>
									</tr>
								</thead>

								<tbody>
								{{range .GlobalRecentPros}}
								<tr>
									<td>
										<a title="{{.Synopsis}}" href="/{{.Path}}">{{.Path}}</a>

										{{if .IsGoRepo}} 
										<span class="label label-info">标准库</span>
										{{end}}
									</td>

									<td>{{.ViewedTime}}</td>
								</tr>
								{{end}}
								</tbody>
							</table>
						</div>

                        <div id="user_recent_view" class="tab-pane fade">
                            <h4>
                                您最近关注的项目.
                                <a href="#global_recent_view" class="btn btn-inverse" data-toggle="tab">全局历史</a>
                            </h4>

                            <table name="recent_table" class="table table-bordered table-hover">
                                <thead>
                                	<tr>
										<th>项目路径（排名值）</th>
										<th>浏览时间（本地）</th>
                                	</tr>
                                </thead>

                                <tbody>
                                {{range .UserRecentPros}}
                                <tr>
                                    <td>
                                        <a title="{{.Synopsis}}" href="/{{.Path}}">{{.Path}}</a>
                                    </td>

                                    <td>{{.ViewedTime}}</td>
                                </tr>
                                {{end}}
                                </tbody>
                            </table>
                        </div>

                        <script>
                            (function () {
                                var tables = document.getElementsByName("recent_table");
                                var now = new Date();
                                for (var n = 0; n < tables.length; n++) {
                                    var table = tables[n];
                                    var items = table.getElementsByTagName("tr");
                                    for (var i = 1; i < items.length; i++) {
                                        // Limit length.
                                        var s = table.rows[i].cells[0].getElementsByTagName("a")[0];
                                        if (s.innerHTML.length > 45) {
                                            s.title="Path: "+ s.innerHTML+"\n"+ s.title;
                                            s.innerHTML = "..." + s.innerHTML.substr(s.innerHTML.length - 42);
                                        }
                                        // Convert timestamp to local time.
                                        var t = parseInt(table.rows[i].cells[1].innerHTML);
                                        var d = new Date(t * 1000);
                                        table.rows[i].cells[1].innerHTML = d.toLocaleString();
                                    }
                                }
                            })();
                        </script>
		    		</div>
				</div>

	    		<div id="homeright" class="span6 homeright">
	    			<div>
	    				<h4>公告栏</h4>
	    				<p>
	    					新版的 Go 步行者已经发布，新特性包括通过 <a target="_blank" href="https://gist.github.com/">Gist</a> 为项目添加示例，查看不同 Tag 版本的项目文档。
	    				</p>
	    				<a class="btn btn-primary" target="_blank" href="https://github.com/Unknwon/gowalker/blob/master/docs/Features_ZH.md">了解更多</a>
	    			</div>

                    <div>
                        <h4>热门项目</h4>
                        <ul class="nav nav-tabs nav-tabs-google">
                            <li class="active">
                                <a href="#top_rank" data-toggle="tab">总排名值</a>
                            </li>

                            <li>
                                <a href="#top_viewd" data-toggle="tab">总浏览量</a>
                            </li>

                            <li>
                                <a href="#rock_this_week" data-toggle="tab">本周之星</a>
                            </li>
                        </ul>

                        <div class="tab-content">
                            <div id="top_rank" class="tab-pane fade active in">
                                <ul name="pop_list" class="unstyled">
                                    {{range .TopRankPros}}
                                    <li>
                                        <span class="badge badge-inverse">{{.Rank}}</span>
                                        <a title="{{.Synopsis}}" href="/{{.Path}}">{{.Path}}</a>
                                    </li>
                                    {{end}}
                                </ul>
                            </div>

                            <div id="top_viewd" class="tab-pane fade">
                                <ul name="pop_list" class="unstyled">
                                    {{range .TopViewedPros}}
                                    <li>
                                        <span class="badge">{{.Views}}</span>
                                        <a title="{{.Synopsis}}" href="/{{.Path}}">{{.Path}}</a>
                                    </li>
                                    {{end}}
                                </ul>
                            </div>

                            <div id="rock_this_week" class="tab-pane fade">
                                <ul name="pop_list" class="unstyled">
                                    {{range .RockPros}}
                                    <li>
                                        <span class="badge badge-success">{{.Rank}}</span>
                                        <a title="{{.Synopsis}}" href="/{{.Path}}">{{.Path}}</a>
                                    </li>
                                    {{end}}
                                </ul>
                            </div>
                        </div>

                        <script>
                            (function () {
                                var lists = document.getElementsByName("pop_list");
                                var now = new Date();
                                for (var n = 0; n < lists.length; n++) {
                                    var list = lists[n];
                                    var items = list.getElementsByTagName("li");
                                    for (var i = 0; i < items.length; i++) {
                                        // Limit length.
                                        var s = items[i].getElementsByTagName("a")[0];
                                        if (s.innerHTML.length > 40) {
                                            s.title="Path: "+ s.innerHTML+"\n"+ s.title;
                                            s.innerHTML = "..." + s.innerHTML.substr(s.innerHTML.length - 37);
                                        }
                                    }
                                }
                            })();
                        </script>
                    </div>
	
	    			<div>
	    				<h4>最近更新示例</h4>
						<ul class="unstyled">
							{{range .RecentExams}}
							<li>
								<a href="/{{.Path}}">{{.Path}}</a>
							</li>
							{{end}}
						</ul>
	    			</div>

	    			<div>
						<h4>更多项目</h4>
						<ul class="unstyled">
							<li>
								<a href="/index">索引</a>
							</li>

							<li>
								<a href="/search?q=gorepo">标准库</a>
							</li>

							<li>
								<a target="_blank" href="https://code.google.com/p/go-wiki/wiki/Projects">Projects @ go-wiki</a>
							</li>
						</ul>
	    			</div>
	    		</div>
    		</div>
		</div>
		{{template "footer_zh" .}}
	</body>
</html>

